import React from 'react'
import { Form, Input, Button, Select, Switch, Radio, DatePicker } from 'antd';
import style from './index.module.scss'
import { Link } from 'react-router-dom';
import {
    LeftOutlined,
} from '@ant-design/icons';
const { Option } = Select

export default function BankMoneyInAdd(props) {
   
    const layout = {
        labelCol: { span: 8 },
        wrapperCol: { span: 16 },
    };
    const tailLayout = {
        wrapperCol: { offset: 8, span: 16 },
    };

    /* eslint-disable no-template-curly-in-string */
    const validateMessages = {
        required: '此选项为必填字段',
        types: {
            email: '${label} is not a valid email!',
            number: '${label} is not a valid number!',
        },
    };
    /* eslint-enable no-template-curly-in-string */


    const onFinish = (values) => {
        console.log(values);
    }
    const onChange = (date, dateString) => {
        console.log(date, dateString);
    }

    return (
        <div>
            <Link to='/home/bankMoneyIn'><Radio.Button value="large" className='buttonloan'> <LeftOutlined /> 返回</Radio.Button></Link>
            <Form {...layout} name="nest-messages" onFinish={onFinish} validateMessages={validateMessages} className={style.box}>
                <Form.Item name={['user', 'name']} label="日期" rules={[{ required: true }]}>
                    <DatePicker onChange={onChange} />
                </Form.Item>
                <Form.Item name={['user', 'email']} label="凭证号" rules={[{ type: 'email', required: true }]}>
                    <Input  />
                </Form.Item>
                <Form.Item name={['user', 'website']} label="摘要">
                    <Select defaultValue="请选择摘要" style={{ width: 150 }} allowClear>
                        <Option value="摘要">摘要</Option>
                    </Select>
                </Form.Item>
                <Form.Item name={['user', 'website']} label="流水发生方式" rules={[{ required: true }]}>
                    <Select defaultValue="转出" style={{ width: 150 }} allowClear>
                        <Option value="转出">转出</Option>
                    </Select>
                </Form.Item>
                <Form.Item name={['user', 'age']} label="货方发生额" rules={[{ required: true }]}>
                    <Input />
                </Form.Item>
                <Form.Item name={['user', 'website']} label="转出账户">
                    <Select defaultValue="请选择" style={{ width: 150 }} allowClear>
                        <Option value="2324343435454">2324343435454</Option>
                    </Select>
                </Form.Item>
                <Form.Item name={['user', 'website']} label="备注" rules={[{ required: true }]}>
                    <Input.TextArea  />
                </Form.Item>
                <Form.Item {...tailLayout}>
                    <Button type="primary" htmlType="submit" style={{ margin: 40 }}>
                        提交
                    </Button>
                    <Button htmlType="button" >
                        取消
                    </Button>
                </Form.Item>
            </Form >
        </div>
    )
}

